def get_breadcrumb(categrory):
    breadcrumb = {
        'cat1': '',
        'cat2': '',
        'cat3': '',

    }

    # 一级分类
    if categrory.parent is None:
        breadcrumb['cat1'] = categrory
     # 三级分类
    elif categrory.subs.count == 0:
        breadcrumb['cat1'] = categrory.parent.parent
        breadcrumb['cat2'] = categrory.parent
        breadcrumb['cat3'] = categrory
    else:
        breadcrumb['cat2']=categrory
        breadcrumb['cat3']=categrory.parent

    return breadcrumb